package com.cloud.ribbon.controller;

import com.cloud.ribbon.service.RibbonClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 2020/3/17
 * RibbonClientController
 *
 * @author machuanpeng
 */
@RestController
public class RibbonClientController {

    @Autowired
    private RibbonClientService ribbonClientService;

    @GetMapping("/home")
    public String home(@RequestParam(value = "name", defaultValue = "ribbon") String name) {
        return ribbonClientService.homeRibbonService(name);
    }
}
